'use strict';

var __importDefault =
    (this && this.__importDefault) ||
    function (mod) {
        return mod && mod.__esModule
            ? mod
            : {
                  default: mod
              };
    };

exports.__esModule = true;
/*
  两种网络请求：postRequest => POST, getRequest => GET
  请求头header: 默认json，支持自定义({})或快速写入('form', 'json')
*/

var request_1 = require('../../utils/request');

var globalData_1 = require('../../globalData');

var marketingRequest = new request_1['default']({
    ApiUrl: globalData_1['default'].marketingUrl
}); //获取用户（付费会员，成长会员）信息

exports.getMarketingAllMemberInfo = function (params) {
    return marketingRequest.postRequest({
        url: 'app/payle/rule/user/detail',
        data: params
    });
}; // 付费会员
//查询付费会员列表付费会员栏和已开通付费信息展示

exports.getPayleMemberDeatile = function (params) {
    return marketingRequest.postRequest({
        url: 'app/payle/rule/detail',
        data: params
    });
}; // 成长会员
//查询成长等级会员配置规则列表

exports.getMemberRuleList = function () {
    return marketingRequest.getRequest({
        url: 'app/growthle/rule/list'
    });
}; //营销获客成长会员获取会员信息

exports.getMarketingMemberInfo1 = function (params) {
    return marketingRequest.postRequest({
        url: 'app/growthle/user/get/info',
        data: params
    });
}; // 成长等级会员规则详情

exports.getMarketingMemberDetail = function (data) {
    return marketingRequest.getRequest({
        url: 'app/growthle/bscrule/detail',
		data
    });
}; // 获取积分列表

exports.getIntegralList = function (params) {
    return marketingRequest.getRequest({
        url: 'app/reward/user/integral/list',
        data: params
    });
}; // 获取免服务费列表

exports.getFreelList = function (params) {
    return marketingRequest.getRequest({
        url: 'app/reward/user/serve/free/list',
        data: params
    });
}; // 生成二维码

exports.generateQrCode = function (params) {
    return marketingRequest.postRequest({
        url: 'app/weixin/applet/generateQrCode',
        data: params
    });
}; // 根据类型获取累计总值(plUserId-用户id必传，type-类型必传)

exports.leijiDetail = function (params) {
    return marketingRequest.postRequest({
        url: 'app/leiji/detail',
        data: params
    });
}; // 个人账户-用户充值(支付之前调取)

exports.rechargeBefore = function (params) {
    return marketingRequest.postRequest({
        url: 'app/activity/recharge/rechargeBefore',
        data: params
    });
}; // 个人账户-用户充值(支付成功后调取)

exports.recharge = function (params) {
    return marketingRequest.postRequest({
        url: 'app/activity/recharge/recharge',
        data: params
    });
}; // 扫码活动-新增扫码访问记录

exports.reccodeacUserAdd = function (params) {
    return marketingRequest.postRequest({
        url: 'app/codeac/user/add',
        data: params
    });
}; // 开通付费会员之前调用

exports.verifyPayStatus = function (params) {
    return marketingRequest.postRequest({
        url: 'app/payle/rule/user/verifyPayStatus',
        data: params
    });
};



 // 邀请奖励活动 新用户首次充值 通知后端
 exports.firstRewardSendRecharge = function (params) {
    return marketingRequest.postRequest({
        url: 'app/activity/recharge/firstRewardSendRecharge',
        data: params
    });
};